package newx.utils
{
	import flash.filters.BitmapFilterQuality;
	import flash.filters.ColorMatrixFilter;
	import flash.filters.GlowFilter;
	
	/**
	 *常用滤镜效果
	 *  
	 * @author guyi
	 * 
	 */
	public class FilterUtil
	{
		public function FilterUtil()
		{
		}
		
		static private 	var 	_red:Number			= 0.3086; 
		static private 	var		_green:Number		= 0.694; 
		static private  	var 	_blue:Number		= 0.0820; //这三个值是提供标准的黑白效果
		
		
		
		/**
		 *黑白禁用效果滤镜 
		 */		
		static public 		var 	GrayColorFilter : ColorMatrixFilter = new ColorMatrixFilter(new Array(
																						_red, 	_green,	_blue,	0,	0,
																						_red,	_green,	_blue,	0,	0,	
																						_red,	_green,	_blue,	0, 	0, 	
																						0, 		0, 		0, 		1, 	0)
																					);	
		
		/**
		 *绿色发光滤镜，用在NPC滑过状态 
		 */		
//		static public var greenGlowFilter	:	GlowFilter	=	new GlowFilter(0x00ff00,1,4,4,5,1);
		
		static public var WhiteGlowFilter:	GlowFilter	=	new GlowFilter(0xffffff, .7, 10, 10 );
		
		
		/**
		 *文本的滤镜效果 
		 */		
		static public var txtGlowFilter		:GlowFilter		=	new GlowFilter(0x000000,1,2,2,4,BitmapFilterQuality.HIGH);

	}
}